refactor(vara-eth-idea/frontend): cleanup chain entity layouts#2300
Merged
nikitayutanov merged 3 commits intomainfrom Jan 23, 2026
Merged
refactor(vara-eth-idea/frontend): cleanup chain entity layouts#2300nikitayutanov merged 3 commits intomainfrom
nikitayutanov merged 3 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors chain entity layouts in the vara-eth-idea frontend to consolidate UI patterns and improve code consistency. The refactoring introduces a reusable ChainEntity component pattern to standardize the display of blockchain entities (programs, codes, and users).
Changes:
- Simplified
formatDateutility function to use nativetoLocaleString()instead of custom formatting - Refactored user, program, and code pages to use new
ChainEntitycomponent subcomponents - Removed standalone
NotFoundcomponent in favor ofChainEntity.NotFound - Updated Program type definitions to make fields optional and change type from
numbertostringforcreatedAt
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| shared/utils/index.ts | Simplified formatDate to use toLocaleString() |
| pages/user/user.tsx | Refactored to use ChainEntity components and viem utilities |
| pages/user/user.module.scss | Removed duplicate styles now handled by ChainEntity |
| pages/program/program.tsx | Refactored to use ChainEntity components, improved loading checks |
| pages/program/program.module.scss | Removed duplicate styles, added status and executableBalance styles |
| pages/code/code.tsx | Refactored to use ChainEntity components and Link instead of anchor tag |
| pages/code/code.module.scss | Removed duplicate styles now handled by ChainEntity |
| features/programs/lib/queries.ts | Updated Program type with optional fields and string createdAt |
| features/messages/components/message-data/message-data.tsx | Updated to use renamed BlockNumber component |
| components/ui/not-found/* | Removed standalone NotFound component (3 files) |
| components/ui/index.ts | Removed NotFound export |
| components/ui/chain-entity/chain-entity.tsx | Renamed Block to BlockNumber for clarity |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
91e3fca to
5b8a2b7
Compare
osipov-mit
approved these changes
Jan 20, 2026
f513f19 to
a87a9ab
Compare
4d12195 to
8315658
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.